package com.plian.system.wrapper.szyd;

import com.plian.system.dto.nkgl.InternalManagementDTO;
import com.plian.system.dto.szyd.TbImportantMattersDTO;
import com.plian.system.entity.nkgl.InternalManagement;
import com.plian.system.entity.szyd.TbImportantMatters;
import com.plian.system.mybatis.support.BaseWrapper;
import com.plian.system.vo.nkgl.InternalManagementVO;
import com.plian.system.vo.szyd.TbImportantMattersVO;
import com.plian.system.wrapper.util.CacheWrapperUtil;
import com.plian.system.wrapper.util.WrapperUtil;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import static com.plian.system.wrapper.util.WrapperConstant.*;

/**
 *  三重一大-重要事项
 *
 * @author zhangsk
 * @since 2025-01-16
 */
@Mapper(componentModel = SPRING, uses = {CacheWrapperUtil.class, WrapperUtil.class})
public interface TbImportantMattersWrapper extends BaseWrapper<TbImportantMatters, TbImportantMattersDTO, TbImportantMattersVO> {

	/**
	 * Entity转VO
	 *
	 * @param entity /
	 * @return /
	 */
	@Override
	@Mappings(value = {
			@Mapping(source = "createCompanyId", target = "fillCompanyName", qualifiedByName = ORG_ID_TO_NAME),
			@Mapping(source = "createUser", target = "createUserName", qualifiedByName = USER_ID_TO_NAME),
			@Mapping(source = "updateUser", target = "updateUserName", qualifiedByName = USER_ID_TO_NAME),
			@Mapping(source = "matterType", target = "matterTypeName", qualifiedByName = DICT_CODE_TO_NAME),
			@Mapping(source = "decisionMeetType", target = "decisionMeetTypeName", qualifiedByName = DICT_CODE_TO_NAME)
	})
	TbImportantMattersVO entityToVO(TbImportantMatters entity);
}
